<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets temporary per-document attribute value
   overrides</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setmaxquerytime.html">SphinxClient::setMaxQueryTime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setrankingmode.html">SphinxClient::setRankingMode</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="sphinxclient.setoverride" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SphinxClient::setOverride</h1>
  <p class="verinfo">(PECL sphinx &gt;= 1.0.3)</p><p class="refpurpose"><span class="refname">SphinxClient::setOverride</span> &mdash; <span class="dc-title">Sets temporary per-document attribute value
   overrides</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sphinxclient.setoverride-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>SphinxClient::setOverride</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$attribute</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$values</code></span>
   )</div>

  <p class="para rdfs-comment">
   Sets temporary (per-query) per-document attribute value overrides. Override
   feature lets you &quot;temporary&quot; update attribute values for some documents
   within a single query, leaving all other queries unaffected. This might be
   useful for personalized data </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sphinxclient.setoverride-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">attribute</code></em></dt>

     <dd>

      <p class="para">
       An attribute name.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">type</code></em></dt>

     <dd>

      <p class="para">
       An attribute type. Only supports scalar attributes.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">values</code></em></dt>

     <dd>

      <p class="para">
       Array of attribute values that maps document IDs to overridden
       attribute values.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-sphinxclient.setoverride-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>PECL/sphinx 版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>1.0.3</td>
       <td>
        Added SphinxClient::setOverride(), available only if compiled with
        libsphinxclient &gt;= 0.9.9.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sphinxclient.setoverride-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setmaxquerytime.html">SphinxClient::setMaxQueryTime</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setrankingmode.html">SphinxClient::setRankingMode</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
